public class InitialContext {
    public Object lookup(String name) {
        if (name.equalsIgnoreCase("SERVICE1")) {
            return new Service1();
        } else {
            return new Service2();
        }
    }
}
